package com.system.arrangement.feign;

import com.system.arrangement.been.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 林
 */
@FeignClient(value = "employee-service", path = "/employee")
public interface EmployeeServiceFeign {
    @PostMapping("/save")
    boolean saveHandle(Employee employee);

    @DeleteMapping("/del/{id}")
    boolean deleteHandle(@PathVariable("id") int id);

    @PutMapping("/update")
    boolean updateHandle( Employee employee);

    @GetMapping("/get/{id}")
    Employee getHandle(@PathVariable("id") int id);

    @GetMapping("/get/list")
    List<Employee> listHandle();

    @GetMapping("/get/listAllByDepartmentId/{departmentById}")
    List<Employee> listAllByDepartmentId(@PathVariable("departmentById")int departmentById);
}
